package BehavioralMode.interpreter.calculator;

/**
 * 减法表达式
 * */
public class SubExpression extends AbstractExpression{

    private AbstractExpression right ;
    private AbstractExpression left ;

    public SubExpression(AbstractExpression right, AbstractExpression left) {
        this.right = right;
        this.left = left;
    }


    @Override
    public int interpret(Context context) {
        return right.interpret(context) - left.interpret(context);
    }
}
